package com.sjh.data.demo.entity;

import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;
import java.util.Date;

/**
 * 功能描述
 *
 * @author songjiahao
 * @date 2023/04/04  8:58
 */
@Data
@Accessors(chain = true)
public class Student {
    @NotBlank
    private String name;
    @NotNull
    private Integer age;
    @Past
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday;
}
